
cc.Class({
    extends: cc.Component,

    properties: {
        Ct_Portrait:cc.Sprite,
        Ct_Name:cc.Label,
        Ct_Answer:cc.Label,
        Ct_Time:cc.Label,
        LikeQuantity:cc.Label
    },
    init:function (data) {
        var self = this;
        cc.loader.load({url: data.url, type: 'png'}, function (err, texture) {
            self.Ct_Portrait.spriteFrame = new cc.SpriteFrame(texture)
        });
        this.Ct_Name.string = data.name;  //data.name;
        this.Ct_Answer.string = data.Answer;
        this.Ct_Time.string = data.Time;
        this.LikeQuantity.string = data.LikeQuantity;
    },
    onClick(){
        //获取点击人信息发送至服务器这个已经点击过了
        this.LikeQuantity.string = parseInt(this.LikeQuantity.string)+1;
    }
});
